﻿using System;
using System.Collections.Generic;
using System.Text;
using AdaptiveAgents.Agents.Choosers;
using AdaptiveAgents.Agents.Predicters;

namespace AdaptiveAgents.Agents
{
    /// <summary>
    /// Builds an agent that chooses the next player according to MDP with real values (not estimated values) 
    /// </summary>
    class MDPOptimalBuilder : AgentBuilder
    {
        public List<double> EpsilonData { get; private set; }
        public List<double> CompetenceData { get; private set; }

        public MDPOptimalBuilder(List<double> comp, List<double> eps)
        {
            CompetenceData = comp;
            EpsilonData = eps;
        }
        
        public override void buildNextPlayerDecision()
        {
            _agent.NextPlayerChooser = new MDPOptimalNextPlayerChooser(_agent, CompetenceData, EpsilonData);
        }

        public override void buildNextPlayerPrediction()
        {
            _agent.NextPlayerPredicter = new NormalNextPlayerPredicter(_agent);

        }

        public override void buildMemoryOfAgent()
        {
            _agent.Memory = int.MaxValue;
        }
    }

    
}
